﻿using UnityEngine;
using System.Collections;

public class cityHealPowerUp : powerUpBase
{
    private Buildings cityRef;
    // Use this for initialization
    void Start()
    {
		FullHeal();
        GameObject theCity = GameObject.Find("Building");
        cityRef = theCity.GetComponent<Buildings>();
    }

    // Update is called once per frame
    protected override void activatePowerUp()
    {
        cityRef.FullShields();
        if ((cityRef.CurrHealth + 400) >= cityRef.Health)
        {
            cityRef.FullHeal();
            return;
        }
        cityRef.CurrHealth += 400;
    }
}

